package com.loop.homework;

import com.loop.homework.pojo.Animal;

public class AnimalTest {
    public static void main(String[] args) {
        //动物猫-花猫的实例
        Animal animalCat = new Animal();
        animalCat.setName("花猫");
        animalCat.setAge(3);

        //动物狗-斑点的实例
        Animal animalDog = new Animal();
        animalDog.setName("斑点");
        animalDog.setAge(2);
        //调用它们的eat方法
        animalCat.eat();
        animalDog.eat();
    }
}
